package com.mrjy.common.qtz;

import java.util.Map;

import javax.annotation.Resource;

import org.apache.log4j.Logger;

import com.mrjy.maintain.bo.IUserMemberInfoBo;

public class UserMemberStatusCheckJob{
	
	@Resource
	private IUserMemberInfoBo userMemberInfoBo;
	
    private static Logger logger = Logger.getLogger(UserMemberStatusCheckJob.class);
    /**
     * @Description: 任务执行获取 token
     * @param    
     */
    @SuppressWarnings("unchecked")
	public void doJob() {
    	
		Map<String , Object> map = (Map<String, Object>) userMemberInfoBo.txCheckUserMemberExpired();
    	logger.debug("定时器定期检查会员状态 ：=================================>" +map.get("err_msg"));
    	/**
    	 * 检查距离会员过期还有15天的记录
    	 */
    	map = (Map<String, Object>) userMemberInfoBo.checkUserBalanceWillExpire(15);
    	logger.debug("定时器定期检查会员状态 ：=================================>" + map.get("err_msg"));
    	
    	/**
    	 * 检查距离会员过期还有3天的记录,并发送微信通知
    	 */
    	map = (Map<String, Object>) userMemberInfoBo.checkUserBalanceWillExpire3Day(3);
    	logger.debug("定时器定期检查会员状态 ：=================================>" + map.get("err_msg"));
    }

}